package com.mapper;

import com.pojo.OutApply;
import com.pojo.OutApply;

import java.util.List;

public interface OutApplyMapper {


    /**
     * 插入outApply元组
     * @param outApply
     */
    void
    add(OutApply outApply);

    /**
     * 获取对应的id编号
     * @param applyTime
     */
    OutApply getByApplyTime(String applyTime);


    /**
     * 根据status查找outapply
     * @return
     */
    List<OutApply> getByStatus(String status);


    /**
     * 根据id改变相应申请的status为“已通过”
     * @param outApplyId
     */
    void updateStatusToApprovedById(int outApplyId);


    /**
     * 根据id得到相应的OutApply
     * @param outApplyId
     * @return
     */
    OutApply getById(int outApplyId);

    /**
     * 查找待审核的outapply
     * @return
     */
    List<OutApply> getWaitToCheck();

    /**
     * 根据id改变相应申请的status为“未通过”
     * @param outApplyId
     */
    void updateStatusToRefusedById(int outApplyId);
}
